package pub.zhouhui;


import org.apache.commons.fileupload.ProgressListener;

/**
 * Created by shane on 2017/2/15.
 */
public class UploadListener implements ProgressListener {
    private UploadStatus status;

    public UploadListener(UploadStatus status) {
        this.status = status;
    }

    public void update(long bytesRead, long contentLength, int items) {
        status.setBytesRead(bytesRead);
        status.setContentLength(contentLength);
        status.setItems(items);
    }
}
